docs: split the progress log out of CLAUDE.md into docs/progress/ - #110
Merged
Conversation
CLAUDE.md (= AGENTS.md) is auto-loaded in full at the start of every session. It had grown to 398 lines / 170 KB (~78k tokens, 9% of a 1M context) because every completed phase appended its full record to it. Almost all of that is history: valuable, but needed on demand, not on every turn. Move lines 66-397 verbatim into docs/progress/, split by phase, and keep in CLAUDE.md only what every session needs: positioning, the 7-layer architecture, the numbered design invariants (referenced by name from source docstrings), the correctness red lines, environments, the secret discipline, dev conventions, the current status snapshot, the standing authorizations, the working protocol, the methodology rules, an index of the archive, and the disclosures/roadmap that are currently in force. Nothing is rewritten or summarised away. A reconstruction script verified that concatenating the archive bodies reproduces the original 332 lines exactly, line for line, and the PR ledger line likewise. Lines 1-59 and 61-64 of CLAUDE.md are byte-identical to before; only the Git bullet was replaced by a shorter one pointing at docs/progress/pr_ledger.md. CLAUDE.md: 398 -> 151 lines, 170316 -> 14469 bytes. To keep it from growing back, the archive section states the rule explicitly: new phase records go to docs/progress/, and CLAUDE.md maintains only three moving parts (status table, disclosures, roadmap). Gates: pytest 2537 passed, ruff clean, CLAUDE.md == AGENTS.md.
This was referenced Jul 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
为什么
CLAUDE.md(=AGENTS.md)在每个会话开始时被完整加载。它已经长到 398 行 / 170 KB(约 78k tokens,占 1M 上下文的 9%)——因为每个完成的阶段都把完整记录追加进去。这些记录有价值,但是按需查的历史,不是每一轮都要在场的东西。做了什么
把第 66–397 行逐字搬进
docs/progress/,按阶段切分;CLAUDE.md只留每个会话都需要的:项目定位 / 7 层架构 / 编号的设计不变量(源码 docstring 按编号引用它们)/ correctness 红线 / 环境 / secret 纪律 / 开发约定 / 当前状态 / 常设授权 / 工作制度 / 方法论 / 档案索引 / 当前有效的披露与路线图。没有任何内容被改写或摘要掉。
CLAUDE.md行数CLAUDE.md字节归档结构
docs/progress/README.mdpr_ledger.md01_phase0_3_daily_pipeline.md02_phase4_cache_and_intraday_i1_i4.md03_intraday_i5.md04_data_layer.md05_minute_factors_eval_contract.md06_execution_basis_and_corrections.md07_factor_layer_refactor.md08_gates_disclosures_roadmap.md怎么验证没丢内容
不是靠肉眼比对:写了重建脚本,把各归档文件正文重新拼起来与原
CLAUDE.md第 66–397 行逐行比较——另外程序化确认 第 1–59 行与第 61–64 行逐字节未变(这段含被源码 docstring 按编号引用的 invariant #1/#2/#3,编号绝不能动)。唯一被替换的是第 60 行那条超长的 Git 条目 → 改成短版 + 指向
docs/progress/pr_ledger.md。防止它再长回去
归档小节里写明了规则:新阶段的详细记录写进
docs/progress/,不要写回CLAUDE.md;CLAUDE.md只维护三处随进度变化的内容(当前状态表 / 披露 / 路线图)。执行交接文档 §3 Step 3 与 §8 已同步更新。Gates(lead 本地实跑)
pytest -p no:warnings→ 2537 passed(与 main 基线一致,docs-only 变更)ruff check .→ All checks passedcmp CLAUDE.md AGENTS.md→ 逐字节相同CLAUDE.md/AGENTS.md/docs/progress/*